import Sha1 from 'crypto-js/sha1'

export const encryption = ( token,userId,json ) => {
  const signature = [token, userId, json].sort().join('')
  return {
    signature: Sha1(signature).toString(),
    token: token,
    json: json
  }
}
export const createConfig = ( token ) =>{
  return {
    headers: {
      'Content-Type': 'application/json; charset=UTF-8',
      'Charsert': 'UTF-8',
      'token':token
    },
    timeout: 120000,
    cache: false
  }
}
